class Cat:
    name = "buo"
    tili = 100

    def __init__(self, name, tili):
        self.name = name
        self.tili = tili

    def play(self):
        self.tili -= 10
        print("%s体力会减少为%d" % (self.name, self.tili))

    def sleep(self):
        self.tili += 10
        print("%s补充体力增加为%d" % (self.name, self.tili))


cat1 = Cat("土猫", 20)
cat1.play()
cat1.sleep()